#include "Neighbors.h"

Neighbors::Neighbors(char rad=1)
{
	radius=abs(rad);
	length=0;
	char i,j;
	for(i=-radius;i<=radius;i++)
	{
		for(j=-radius;j<=radius;j++)
		{
			if (j!=0 || i!=0)
			{
				length++;
				x.push_back(j);
				y.push_back(i);
			}
			else
				return;
		}
	}
}

Neighbors::~Neighbors()
{
	//dtor
}
unsigned int Neighbors::GetLength()
{
	return length;
}
char Neighbors::GetRadius()
{
	return radius;
}
char Neighbors::iterx(unsigned int i)
{
	return x[i];
}
char Neighbors::itery(unsigned int i)
{
	return y[i];
}
